package com.eascs.p2p.common.wallet.service;

import java.math.BigDecimal;
import java.util.List;

import com.eascs.app.dao.PageResult;
import com.eascs.p2p.common.entity.InvestorEntity;
import com.eascs.p2p.common.entity.InvestorWalletEntity;
import com.eascs.p2p.common.entity.InvestorWalletFlowEntity;
import com.eascs.p2p.common.entity.InvestorWalletPayEntity;
import com.eascs.p2p.common.entity.InvestorWithdrawRecordEntity;
import com.eascs.p2p.common.vo.InvestorWithdrawRecordVO;
import com.eascs.p2p.common.vo.ModelResult;
import com.eascs.p2p.common.vo.RepaymentVO;

public interface InvestorWalletService {

	/**
	 * @Description: 获取用户钱包
	 * @param investorId 投资人ID
	 */
	public ModelResult<InvestorWalletEntity> queryInvestorWallet(String investorId);
	
	/**
	 * @Description: 获取用户钱包流水
	 * @param investorId 投资人ID
	 * @return PageResult<InvestorWalletFlowEntity>
	 */
	public ModelResult<PageResult<InvestorWalletFlowEntity>> queryInvestorWalletFlowByPage(String investorId, int transType, int pageSize, int pageIndex);
	
	/**
	 * @Description: 标的终止后钱包流水处理(无标的状态修改)
	 * @param investObjId 标的ID
	 */
	public ModelResult<Boolean> stopInvestWalletFlow(String investObjId);
	
	/**
	 * @Description: 标的放款后钱包流水处理(无标的状态修改)
	 * @para investObjId 标的ID
	 *	public ModelResult<Boolean> makeLoansInvestWalletFlow(String investObjId);
	 */
	
	/**
	 * @Description: 添加用户支付记录
	 * @param InvestorWalletPayEntity
	 */
	public ModelResult<Boolean> insertInvestorWalletPay(InvestorWalletPayEntity investorWalletPay);
	
	/**
	 * @Description: 修改用户支付状态
	 * @param InvestorWalletPayEntity
	 */
	public ModelResult<Boolean> updateInvestorWalletPay(InvestorWalletPayEntity investorWalletPay);
	
	/**
	 * @Description: 充值
	 * @param requestno 充值请求号
	 */
	public ModelResult<Boolean> investorWalletPay(String requestno);
	
	
	/**
	 * @Description: 提款--前台提交提款申请调用 
	 * @param InvestorEntity
	 * @param drawMoney 提款金额
	 */
	public ModelResult<Boolean> investorWalletWithdraw(InvestorEntity investor,BigDecimal drawMoney);
	
	/**
	 * @Description: 提款--后台审核确认后调用
	 * @param requestno 提款请求号
	 */
	public ModelResult<Boolean> investorWalletWithdrawConfirm(String requestno);
	
	
	/**
	 * @Description: 添加用户提款记录
	 * @param InvestorWithdrawRecordEntity
	 */
	public ModelResult<Boolean> insertWithdrawRecord(InvestorWithdrawRecordEntity withdrawRecord);
	
	/**
	 * @Description: 修改用户提款状态
	 * @param InvestorWithdrawRecordEntity
	 */
	public ModelResult<Boolean> updateWithdrawRecord(InvestorWithdrawRecordEntity withdrawRecord);
	
	/**
	 * @Description: 查找用户提现状态
	 * @param
	 */
	public ModelResult<InvestorWithdrawRecordEntity> queryWithdrawRecordById(String id);
	
	/**
	 * @Title: findPageInvestorWithdrawRecord
	 * @Description: 分页查询提现记录
	 * @author 张庆奇
	 * @param vo
	 * @return
	 * @return ModelResult<PageResult<Object[]>>
	 * @throws
	 * @date 2016年8月4日 下午4:47:30
	 */
	public   ModelResult<PageResult<Object[]>> findPageInvestorWithdrawRecord(InvestorWithdrawRecordVO vo);
	
	/**
	 * @Description: 还款--钱包流水处理 
	 * @param List<RepaymentVO>
	 */
	public ModelResult<Boolean> repaymentWalletHandle(List<RepaymentVO> repayments);
}
